Range

Function

This API is used to get the parameter range of Event Settings(cloud 专用) > Plan(Old Style).

Note:

The Range provides reference information for client UI input limits and API request limits. When sending Get and Set requests, the parameters must be strictly limited according to the Range, otherwise the request may be rejected by the device.

Request Message

Table 1

ParameterRangeTypeDescription
type"SoundDetection"stringIntelligent type.
Sample:
POST /API/Schedules/OldStyle/Range HTTP/1.1
{
    "data": {
        "type": "SoundDetection"
    }
}

Response Message

Parameter Description

Table 2

ParameterRangeTypeDescription
channel_maxintMaximum number of channels.
channel_infoJSON ObjectChannel info object, see Table 3 for more information.

Table 3

ParameterRangeTypeDescription
CH1Json ObjectChannel object, see Table 4 for more information.
IP_CH1Json Object
WIFI_CH1Json Object

Table 4

ParameterRangeTypeDescription
time_schedulearraysee Table 5 for more information.

Table 5

ParameterRangeTypeDescription
day"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"string
time0: close the time period
1: open the time period
arrayEach array bit represents half an hour.

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "channel_max": 64,
        "channel_info": {
            "type": "object",
            "items": {
                "CH3": {
                    "type": "object",
                    "items": {
                        "time_schedule": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 64,
                            "items": [
                                {
                                    "type": "array",
                                    "min_size": 0,
                                    "max_size": 7,
                                    "items": [
                                        {
                                            "day": {
                                                "type": "string",
                                                "items": [
                                                    "Sun",
                                                    "Mon",
                                                    "Tue",
                                                    "Wed",
                                                    "Thu",
                                                    "Fri",
                                                    "Sat"
                                                ]
                                            },
                                            "time": {
                                                "type": "array",
                                                "min_size": 0,
                                                "max_size": 48,
                                                "items": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 1
                                                }
                                            }
                                        }
                                    ]
                                }
                            ]
                        }
                    }
                }
            }
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.